package vip.kqsy.cloud.blog.server.config;

import com.baidu.aip.contentcensor.AipContentCensor;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import vip.kqsy.cloud.blog.server.properties.AipProperties;

@Configuration
@RequiredArgsConstructor
public class AipConfig {

    private final AipProperties aipProperties;

    @Bean
    public AipContentCensor aipContentCensor() {
        return new AipContentCensor(aipProperties.getAppId(), aipProperties.getAppKey(), aipProperties.getSecretKey());
    }

}
